-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete node on machine deletion #809
Conversation
Hi @enxebre. Thanks for your PR. I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
@vincepri @hardikdr @alvaroaleman can we think of any reason to not do this? |
I have some comments on the implementation but the only reason I can think of that would make this behaviour cause issues is if someone put a wrong nodeRef on a machine object. But if that happens this change makes it more obvious that there is a bug. |
/test pull-cluster-api-make |
1 similar comment
/test pull-cluster-api-make |
@enxebre lgtm outside of the lint issue: W0308 12:44:02.801] Target //:lint-full up-to-date:
W0308 12:44:02.802] bazel-bin/lint-full_script
W0308 12:44:02.803] bazel-bin/lint-full
W0308 12:44:02.806] INFO: Elapsed time: 38.682s, Critical Path: 7.91s
W0308 12:44:02.806] INFO: 362 processes: 362 linux-sandbox.
W0308 12:44:02.807] INFO: Build completed successfully, 369 total actions
W0308 12:44:02.818] INFO: Running command line: bazel-bin/lint-full run '--fast=false'
W0308 12:44:02.818] INFO: Build completed successfully, 369 total actions
I0308 12:44:11.262] pkg/controller/machine/controller.go:182: File is not `gofmt`-ed with `-s` (gofmt)
I0308 12:44:11.263] klog.Infof("Deleting node %q for machine %q", m.Status.NodeRef.Name, m.Name )
I0308 12:44:12.058] Makefile:82: recipe for target 'lint-full' failed
W0308 12:44:12.065] make: *** [lint-full] Error 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre, vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Looks good to me.
/milestone v1alpha1 |
/assign @detiber |
/lgtm |
What this PR does / why we need it:
When running with no cloud controller manager orphan nodes remains forever.
This ensures that when deleting a machine the backed node (if any) is also deleted right away from the machine controller after the actuator succeed deleting the cloud instance, so no need to depend on the existence of a cloud manager to garbage collect the node
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: